---
layout: "default"
title: "_IntegerArithmeticType"
description: "Swift documentation for '_IntegerArithmeticType': This protocol is an implementation detail of IntegerArithmeticType; do."
keywords: "_IntegerArithmeticType,protocol,swift,documentation,addWithOverflow,divideWithOverflow,multiplyWithOverflow,remainderWithOverflow,subtractWithOverflow"
root: "/v1.2"
---

<div class="intro-declaration"><code class="language-swift">protocol _IntegerArithmeticType</code></div>

<div class="discussion comment">
    <p>This protocol is an implementation detail of <code>IntegerArithmeticType</code>; do
not use it directly.</p>

<p>Its requirements are inherited by <code>IntegerArithmeticType</code> and thus must
be satisfied by types conforming to that protocol.</p>
</div>

<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<span class="viz"><a href="hierarchy/">View Protocol Hierarchy &rarr;</a></span>
</td>
</tr>



<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>






<h3>Static Methods</h3>
<div class="declaration" id="func-addwithoverflow__">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-addwithoverflow__">static func addWithOverflow(<wbr>_:<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func-addwithoverflow__"><div class="p">
    <p>Add <code>lhs</code> and <code>rhs</code>, returning a result and a <code>Bool</code> that is
true iff the operation caused an arithmetic overflow.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static func addWithOverflow(lhs: Self, _ rhs: Self) -&gt; (Self, overflow: Bool)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-dividewithoverflow__">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-dividewithoverflow__">static func divideWithOverflow(<wbr>_:<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func-dividewithoverflow__"><div class="p">
    <p>Divide <code>lhs</code> and <code>rhs</code>, returning a result and a <code>Bool</code> that is
true iff the operation caused an arithmetic overflow.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static func divideWithOverflow(lhs: Self, _ rhs: Self) -&gt; (Self, overflow: Bool)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-multiplywithoverflow__">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-multiplywithoverflow__">static func multiplyWithOverflow(<wbr>_:<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func-multiplywithoverflow__"><div class="p">
    <p>Multiply <code>lhs</code> and <code>rhs</code>, returning a result and a <code>Bool</code> that is
true iff the operation caused an arithmetic overflow.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static func multiplyWithOverflow(lhs: Self, _ rhs: Self) -&gt; (Self, overflow: Bool)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-remainderwithoverflow__">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-remainderwithoverflow__">static func remainderWithOverflow(<wbr>_:<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func-remainderwithoverflow__"><div class="p">
    <p>Divide <code>lhs</code> and <code>rhs</code>, returning the remainder and a <code>Bool</code> that is
true iff the operation caused an arithmetic overflow.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static func remainderWithOverflow(lhs: Self, _ rhs: Self) -&gt; (Self, overflow: Bool)</code>
    
    
</div></div>
</div>
<div class="declaration" id="func-subtractwithoverflow__">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-subtractwithoverflow__">static func subtractWithOverflow(<wbr>_:<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func-subtractwithoverflow__"><div class="p">
    <p>Subtract <code>lhs</code> and <code>rhs</code>, returning a result and a <code>Bool</code> that is
true iff the operation caused an arithmetic overflow.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">static func subtractWithOverflow(lhs: Self, _ rhs: Self) -&gt; (Self, overflow: Bool)</code>
    
    
</div></div>
</div>



